package com.pro.mapper;

import com.pro.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 许振杰
 * @version V1.0
 * @Title: 微圈mapper层
 * @Package com.pro.mapper
 * @date 2022/1/6 0006
 */
public interface JsMicrocircleMapper {
    //获取微圈的Ztree树
    List<JsActicleCategroy> getMicrocircleZtree();

    //树节点的添加
    boolean addZtreeNode(@Param("artcleCategroyName") String artcleCategroyName, @Param("createId") String createId, @Param("createDate") String createDate, @Param("parentId") Integer parentId);

    //树节点的删除
    boolean delZtreeNode(Integer acticleCategroyId);

    //树节点的修改
    boolean editZtreeNode(Integer acticleCategroyId, String artcleCategroyName, String updateId, String updateDate);

    //点击树节点展示对应分类
    List<JsActicleCategroy> getMicrocircleZtreeById(Integer acticleCategroyId, Integer details);

    //获取微圈列表数据
    List<JsMicrocircle> getMicrocircleTable(Integer details);

    //微圈模糊查询
    List<JsActicleCategroy> getMicrocircleSearch(Integer details, @Param("artcleTitle") String artcleTitle, @Param("userName") String userName, @Param("account") String account);

    //查看微圈
    JsMicrocircle getMicrocircleBymicrocircleId(Integer microcircleId);

    //删除微圈
    boolean delMicrocircleBymicrocircleId(Integer microcircleId);

    //删除微圈对应评论
    boolean delMicrocircleComment(Integer commodityId);

    /**
     * @Title: 微圈的添加
     * @author 许振杰
     * @date 2022/1/11 0011 11:54
     * @version V1.0
     */
    boolean addMicrocircle(JsMicrocircle microcircle);

    /**
     * @Title: 审核记录的添加
     * @author 许振杰
     * @date 2022/1/11 0011 21:09
     * @version V1.0
     */
    boolean addCourseRecord(JsCourseRecord courseRecord);

    /**
     * @Title: 微圈审核记录的删除
     * @author Administrator
     * @date 2022/1/13 0013 14:42
     * @version V1.0
     */
    boolean delCourseRecord(Integer courseId, Integer type);

    /**
     * @Title: 微圈草稿的修改
     * @author 许振杰
     * @date 2022/1/12 0012 15:27
     * @version V1.0
     */
    boolean editMicrocircle(JsMicrocircle microcircle);

    /**
     * @Title: 根据状态的微圈信息
     * @author Administrator
     * @date 2022/1/12 0012 16:25
     * @version V1.0
     */
    List<JsMicrocircle> getMicrocircleBydetails(Integer details);

    /**
     * @Title: 微圈信息的修改
     * @author 许振杰
     * @date 2022/1/12 0012 18:35
     * @version V1.0
     */
    boolean editMicrocircleBymicrocircleId(Integer microcircleId, String releaseDate, Integer details);


    //添加操作日志
    boolean addMicrocircleLog(JsLog log);

    //查看微圈对应评论
    List<JsComment> getMicrocircleComment(Integer commodityId, Integer type, Integer userType);

    //查看对应微圈的评论数量
    Integer getMicrocircleCommentNum(Integer commodityId, Integer type);

    //添加一条评论
    boolean addMicrocircleComment(JsComment comment);

    //隐藏显示评论
    boolean editDisplay(JsComment comment);

    //删除评论（假删除）
    boolean deleteComment(Integer id);

    /**
     * @Title: 根据id删除微圈对应评论
     * @author Administrator
     * @date 2022/1/14 0014 9:38
     * @version V1.0
     */
    boolean delCommentByCommodityId(Integer commodityId, Integer type);

    /**
     * @Title: 个人微圈
     * @author 许振杰
     * @date 2022/1/13 0013 18:47
     * @version V1.0
     */
    List<JsMicrocircle> personalMicrocircle(Integer userId);

    /**
     * @Title: 个人微圈的模糊查询
     * @author 许振杰
     * @date 2022/1/13 0013 21:54
     * @version V1.0
     */
    List<JsMicrocircle> personalMicrocircleSearch(JsMicrocircle microcircle);

    /**
     * @Title: 微圈操作日志列表
     * @author 许振杰
     * @date 2022/1/14 0014 11:16
     * @version V1.0
     */
    List<JsLog> getMicrocirclLog(Integer logType);

    /**
    * @Title: 微圈列表的模糊查询
    * @author 许振杰
    * @date 2022/1/14 0014 13:53
    * @version V1.0
    */
    List<JsLog> getMicrocirclLogSearch(JsLog log);

    /**
    * @Title: 微圈操作记录的删除
    * @author Administrator
    * @date 2022/1/14 0014 15:09
    * @version V1.0
    */
    boolean delMicrocirclLog(Integer logId);

}
